package com.example.producer.consumer;

import com.example.producer.comm.RabbitConstant;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;


/**
 * @description 简单模式
 * @author shiguorang
 * @date 2023/6/29 11:13:29
 * @version 1.0
 */
@Component
public class RabbitSimpleConsumer {

    @RabbitHandler
    @RabbitListener(queues = RabbitConstant.SIMPLE_QUEUE_NAME)
    public void simpleListener(String context) {
        System.out.println("simpleListener: " + context);
    }
}
